package org.manon.json;

import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.List;

import org.manon.json.filter.Filter;

/**
 * @author <a href="mailto:jacques.militello@gmail.com">Jacques Militello</a>
 */
public interface JSON {

	/**
	 * Serialize a pojo to the given outputStream with the given filter.
	 * 
	 * @param pojo	the pojo to serialize
	 * @param os	the outputstream to write data
	 * @param filter	to filter the pojo
	 * 
	 * @throws IOException
	 */
	<T> void serialize(T pojo,OutputStream os,Filter filter) throws IOException;

	<T> void serialize(List<T> pojo,OutputStream os,Filter filter) throws IOException;
	
	<T> T deserialize(Class<T> pojo,InputStream is) throws IOException;
	
}